Skip to main content

The Simple Harmonic Oscillator

As previously mentioned, in almost all of physics, we encounter a phenomenon called simple harmonic motion. In everyday life, we see simple harmonic motion in many systems, from the motion of a pendulum to the vibrations of a guitar string. On an atomic scale, simple harmonic motion is found in the vibrations of atoms and molecules, and on a cosmic scale, it is found in the oscillations of stars and galaxies. So it really is everywhere.

Table of Contents

A Spring and a Mass

To introduce simple harmonic motion (which we will abbreviate as SHM), we will use a simple system consisting of a spring and a mass. In principle, this system is very simple: a mass is attached to a spring with spring constant . When the mass is displaced from its equilibrium position, the spring exerts a force on the mass that tries to restore it to the equilibrium position.

If we use to denote the displacement of the mass from the equilibrium position, the force exerted by the spring is given by Hooke's law:

where is the unit vector in the direction of the displacement.

Recall from Newton's second law that the force is equal to the mass times the acceleration:

And that the acceleration is the second derivative of the position with respect to time:

We have a second derivative of the position, and hence, this is a second-order ordinary differential equation (ODE). This is the differential equation that describes the motion of a mass-spring system, and it is the starting point for our exploration of simple harmonic motion.

A Simple Pendulum

Another system that exhibits simple harmonic motion is a simple pendulum.

A simple pendulum consists of a mass attached to a string of length . When the mass is displaced from its equilibrium position, the force of gravity exerts a torque on the mass that tries to restore it to the equilibrium position.

If we use to denote the angle of the pendulum with respect to the vertical, the torque exerted by gravity is given by:

The torque is equal to the moment of inertia times the angular acceleration:

Since the moment of inertia of a single point mass is just , we can substitute this in:

Dividing by and rearranging, we get:

This is the differential equation that describes the motion of a simple pendulum, and it is also a second-order ODE. This ODE is very difficult to solve analytically, involving elliptic integrals, so we will explore it in more detail in a future post. For now, at small angles (), the sine function can be approximated as , and the differential equation simplifies to:

This is the differential equation that describes the motion of a simple pendulum in the small angle approximation, and it is equivalent to the differential equation for a mass-spring system.

Comparing the Two Systems

Put side by side, the differential equations for the mass-spring system and the simple pendulum are:

The terms and are both positive constants, and the differential equations are structurally identical. Let represent these constants. Then, we can write the differential equations as:

This is known as the equation of a simple harmonic oscillator (SHO).

Qualitative Analysis

Before we dive into solving this differential equation, let's take a moment to understand what it means. The differential equation tells us that the acceleration of the mass is proportional to its displacement from the equilibrium position, with a negative sign.

This means that when a mass is displaced from its equilibrium position, the spring exerts a force on it that tries to restore it to the equilibrium position. Then, as the mass moves back towards the equilibrium position, it overshoots and moves past it to the other side. This repeats, causing the mass to oscillate back and forth around the equilibrium position.

The same applies to the pendulum; when it is displaced from the vertical, gravity exerts a torque on it that tries to restore it to the vertical. The only difference is that instead of the spring force being the restoring force, it is the gravitational force.

The table below summarizes the behavior of the mass at different points in its motion:

DisplacementVelocityAccelerationSpring/Pendulum
ZeroMaximumZeroEquilibrium
MaximumZeroMinimumOne end
ZeroMinimumZeroEquilibrium
MinimumZeroMaximumThe other end

(Take a moment to internalize this behavior and think about (1) why it makes sense and (2) how it relates to the differential equation .)

Sinusoidal Functions

As one could've guessed, SHM is related to sinusoidal functions, so we can expect the solution to the differential equation to be a sinusoidal function of time.

To prepare for the mathematical analysis, let's first review the properties of sinusoidal functions.

Take a function . We define the following quantities:

  • is the amplitude of the oscillation, which is the maximum displacement from the equilibrium position.

  • is the frequency of the oscillation, which is the number of oscillations per unit time.

  • is the angular frequency of the oscillation, which is the rate at which the object oscillates back and forth.

    The difference between the frequency and the angular frequency is that the angular frequency is in radians per unit time, while the frequency is in cycles per unit time. In one cycle, the object goes through radians, so the angular frequency is related to the frequency by .

  • is the phase shift of the oscillation, which is the initial angle of the object at . It determines the starting point of the oscillation.

  • is the period of the oscillation, which is the time it takes for the object to complete one full oscillation. The period is related to the frequency by , and to the angular frequency by .

Sinusoidal Function (zoomable)

Without a phase shift, the function starts at and oscillates back and forth around the equilibrium position. is an odd function, meaning that it has rotational symmetry about the origin. This is in contrast to the cosine function, which is an even function and starts at .

Both and have a maximum value of . Hence, when multiplied by , and oscillate between and .